package com.laozhao.test.autocomplete;

//import com.laozhao.test.autocomplete.AutoCompleteExtender.DataProvider.DataChangeListener;

/**
 * 数据提供接口
 * @author Univasity
 */
public interface DataProvider {

    public Object getData(int index);

    public void appendData(Object value);

    public void insertData(int index, Object value);

    public void replaceData(int index, Object value);

    public void replaceData(Object oldValue, Object newValue);

    public void removeDataAt(int index);

    public void removeData(Object value);

    public void clear();

    public int getSize();

    public Object[] toArray();

    public void setDataChangeListener(DataChangeListener listener);

//    /**
//     * 数据改变监听接口
//     */
//    public interface DataChangeListener {
//
//        public static final int APPEND = 1;
//        public static final int INSERT = 2;
//        public static final int REPLACE = 3;
//        public static final int REMOVE = 4;
//        public static final int CLEAR = 5;
//
//        public void dataChanged(int action, Object value);
//    }
}

